home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group92c.txt / 000042_icon-group-sender _Wed Oct 28 17:26:20 1992.msg < prev    next >
Internet Message Format  |  1993-01-04  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Wed, 28 Oct 1992 17:26:27 MST
  2. Date: Wed, 28 Oct 1992 17:26:20 MST
  3. From: "Ralph Griswold" <ralph>
  4. Message-Id: <199210290026.AA05706@cheltenham.cs.arizona.edu>
  5. To: icon-group
  6. Subject: semicolons
  7. Status: R
  8. Errors-To: icon-group-errors@cs.arizona.edu
  9.  
  10. One way to think of this is to type RETURN (or whatever your keyboard
  11. uses to generate a line terminator) when you'd have to type a semicolon
  12. in a language with a similar syntax.
  13.  
  14. The only problem then arises when you want to split a line where you
  15. don't want a semicolon.  The rule is easy and quickly learned; don't
  16. break a line when you don't want it to be interpreted as a semicolon
  17. if the potential break place is at the end of a complete expression
  18. and the next line starts with a token that is legitimate to start
  19. an expression.  For the most part, this translates into a simpler
  20. rule:  Put a non-semicolon break after a comma or a binary operator.
  21.  
  22. Thus,
  23.  
  24.     a +
  25.       b
  26.  
  27. not
  28.  
  29.     a
  30.     + b
  31.  
  32. That's really all there is to it, and it doesn't require a lot of
  33. thinking.
  34.     
  35. Ralph E. Griswold            ralph@cs.arizona.edu
  36. Department of Computer Science          uunet!arizona!ralph
  37. The University of Arizona        602-621-6609 (voice)
  38. Tucson, AZ 85721            602-621-9618   (fax)
  39.